package com.myfum.mobile.tetris.events
{
	import com.myfum.mobile.tetris.interfaces.IShape;
	
	import flash.events.Event;
	
	public class MapEvent extends Event
	{
		public static const MAP_CHANGE:String = "mapChange";
		public static const MAP_UPDATE:String = "mapUpdate";
		public static const REDRAW_MAP:String = "redrawMap";
		public static const MAP_APPEND:String = "mapAppend";
		
		private var _was:IShape;
		private var _now:IShape;
		
		public function MapEvent(type:String, was:IShape, now:IShape, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			_was = was;
			_now = now;
			super(type, bubbles, cancelable);
		}
		
		public function get was():IShape{
			return _was;
		}
		
		public function get now():IShape{
			return _now;
		}
		
		override public function clone():Event{
			var e:MapEvent = new MapEvent(type, was, now, bubbles, cancelable);
			return e;
		}
	}
}